package org.bigjava.buff.user.mapper;

import org.apache.ibatis.annotations.Param;
import org.bigjava.buff.goods.bean.ExteriorAndPrice;
import org.bigjava.buff.user.bean.User;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface UserMapper {

    //通过用户对象的一个或多个参数来查询用户
    User getUser(User user);

    //用户注册
    boolean addUser(User user);

    //修改信息
    void updateUser(User user);

    //更新用户余额
    int updateBalance(Map map);

    //获取用户库存
    List<ExteriorAndPrice> getUserInventory(Map map);
    int getTotal(Integer id);

    //通过多个id获取多个商品信息
    List<ExteriorAndPrice> findGoodsByIds(@Param("gid") List<Integer> gid, @Param("uid") Integer uid);

    //收藏物品
    int collectGoods(ExteriorAndPrice ep);





}
